package com.compass.mobile.ui.dialog

import android.view.Gravity
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.fragment.app.FragmentActivity
import com.compass.mobile.databinding.DialogCustmoerServiceBinding
import com.compass.mobile.databinding.DialogFinishInquiryBinding
import com.compass.mobile.databinding.DialogOrderDetailsBinding
import com.compass.mobile.framework.base.BaseDialog
import com.compass.mobile.framework.base.BaseDialogFragment
import com.compass.mobile.framework.constant.BACKSPACE_ACTION
import com.compass.mobile.framework.constant.CANCEL_ACTION
import com.compass.mobile.framework.constant.CLINICAL_RECEPTION
import com.compass.mobile.framework.constant.END_ACTION
import com.compass.mobile.framework.constant.INQUIRY_ACTION
import com.compass.mobile.framework.constant.REFERRAL_ACTION
import com.compass.mobile.framework.constant.selfServicePhone
import com.compass.mobile.framework.constant.selfServiceWxCode
import com.compass.mobile.framework.ext.onClick
import com.compass.mobile.framework.utils.DateUtils
import com.compass.mobile.framework.utils.FocusViewUtils
import com.compass.mobile.framework.utils.QRCodeDealUtils
import com.compass.mobile.models.OrderBean
import com.compass.mobile.ui.activity.OrderDetailsActivity
import dp2px

/**
 * Description： 问诊单dialog
 * Date:2024/7/8 20:12
 */
class FinishInquiryDialog {
    class Builder(
        activity: FragmentActivity,
//        private var type: String?,
        private var hintText: String?
    ) :
        BaseDialogFragment.Builder<Builder>(activity) {
        private val mBinding: DialogFinishInquiryBinding =
            DialogFinishInquiryBinding.inflate(LayoutInflater.from(activity))

        init {
            initView()
//            setDoctor(orderBean)
        }

        private fun initView() {
            setContentView(mBinding.root)
            setWidth((AppManager.getScreenHeightPx() * 0.6).toInt())
            setHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
            setAnimStyle(BaseDialog.AnimStyle.DEFAULT)
            setGravity(Gravity.CENTER)
            setCancelable(true)
//            FocusViewUtils.scaleView(mBinding.tvToOrder, 0)
//            mBinding.tvToOrder.requestFocus()
//            mBinding.tvToOrder.onClick {
//                dismiss()
//                //跳转到我的订单详情
//                OrderDetailsActivity.start(context, orderBean?.id)
//            }
            hintText?.let {
                mBinding.tvStatusText.text = "诊后建议：${hintText}"
            }

        }

    }


}
